import React, { memo } from 'react'
import { ContractListContainer, ContracctListTitle, ContentHeader, ContentItem } from './style';
import ContractInfo from './children/contract-info';


export interface contractProps {
    color: boolean;
    msg?: string;
    [propName: string]: any;
}
const MemoConponent = memo(() => {
    console.log('update')
    return <>
        <ContracctListTitle >合约列表</ContracctListTitle>
        <ContentHeader >
            <ContentItem >合约</ContentItem>
            <ContentItem >价格</ContentItem>
            <ContentItem >涨跌</ContentItem>
        </ContentHeader>
    </>
})
const ContractList: React.FC<contractProps> = (prop) => {
    const { msg = '',data } = prop;
    console.log('ContractList 更新了')
    return (
        <ContractListContainer>
            <MemoConponent />
            <ContractInfo data ={data} />
        </ContractListContainer>
    )
}

export default ContractList;